package com.aierkeji.b2c.dao.jpa;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.aierkeji.b2c.dao.BaseJPADao;
import com.aierkeji.b2c.entity.AkjAlipayOrder;

public interface AkjAlipayOrderDao  extends BaseJPADao<AkjAlipayOrder, String> {
	
	public AkjAlipayOrder findByOutOrderNo(String outOrderNo) ;
	
	@Modifying
	@Query("update AkjAlipayOrder set isDelete = '1' where id = :id and (isDelete = '0' or isDelete is null) and freezeStatus is null  and orderRecordId is null")
	public int delete(@Param("id")String id);

}
